package com.chinasofti.shoot;
//子弹 是飞行物
public class Bullet extends FlyingObject{
    private int speed = 4;//走步的步数
    public Bullet(int x,int y){
        image = ShootGame.bullet;
        width = image.getWidth();
        height = image.getHeight();
        this.x = x;//子弹随着英雄机移动
        this.y = y;//子弹随着英雄机移动
    }

    @Override
    public void step() {
        y -= speed;
    }


    @Override
    public boolean outOfBounds() {
        return this.y< -this.height;
    }

}
